package com.geeaks.learn.rename;

import java.io.File;
import java.util.List;
import org.apache.commons.io.FileUtils;
import org.springframework.util.ResourceUtils;
import com.google.common.base.Strings;
import cn.hutool.core.util.StrUtil;

public class GetTableSQL {
	
	public static void main(String[] args) throws Exception {
		File file = ResourceUtils.getFile("classpath:tablename");
		List<String> lines = FileUtils.readLines(file);
		for(String line : lines) {
			if(Strings.isNullOrEmpty(line)) continue;
			String template = "show create table {};";
			String sql = StrUtil.format(template, line);
			System.err.println(sql);
		}
	}
}
